{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 40,
   "id": "e3c49028-f465-47f2-aa47-fc18ff053402",
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "import os.path\n",
    "import sys\n",
    "sys.path.append(os.path.abspath('..'))\n",
    "from datetime import datetime,timedelta\n",
    "import random\n",
    "import math\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import cnmaps\n",
    "from cnmaps import get_adm_maps, draw_maps\n",
    "from shapely.geometry import Point, Polygon\n",
    "import matplotlib.pyplot as plt\n",
    "import importlib\n",
    "import dateutil.parser"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "id": "4524c417-d2fb-4835-9973-601b400a9bab",
   "metadata": {},
   "outputs": [],
   "source": [
    "elements='Station_Id_C,Station_levl,Lat,Lon,Alti,Admin_Code_CHN,V_ACODE_4SEARCH,Town_code,City,Station_Name,Cnty,COUNTRYCODE,Country,NetCode,Province,REGIONCODE,Town,DATA_ID,Datetime,IYMDHM,RECORD_ID,D_RETAIN_ID,RYMDHM,D_SOURCE_ID,UPDATE_TIME,Q_PRE_Arti_Enc_CYC,Q_WEP_Past_CYC,Q04080_05_1,Q_PRS,Q_PRS_Sea,Q_PRS_Change_3h,Q_PRS_Change_24h,Q_PRS_Max,Q_PRS_Max_OTime,Q_PRS_Min,Q_PRS_Min_OTime,Q_WIN_D,Q_WIN_S,Q_WIN_S_Max,Q_WIN_S_Max_OTime,Q_WIN_S_Inst_Max,Q_WIN_S_INST_Max_OTime,Q_WIN_D_INST,Q_WIN_S_INST,Q_WIN_D_INST_Max,Q_WIN_D_Avg_2mi,Q_WIN_S_Avg_2mi,Q_WIN_D_Avg_10mi,Q_WIN_S_Avg_10mi,Q_WIN_D_S_Max,Q_WIN_D_Inst_Max_6h,Q_WIN_D_Inst_Max_12h,Q_WIN_S_Inst_Max_6h,Q_WIN_S_Inst_Max_12h,Q_TEM,Q_DPT,Q_TEM_Max,Q_TEM_Max_OTime,Q_TEM_Min,Q_TEM_Min_OTime,Q_GST_Min_12h,Q_TEM_Max_24h,Q_TEM_Min_24h,Q_GST_5cm,Q_GST_10cm,Q_GST_15cm,Q_GST_20cm,Q_GST_40Cm,Q_GST_80cm,Q_GST_160cm,Q_GST_320cm,Q_GST,Q_GST_Min,Q_GST_Min_OTime,Q_GST_Max,Q_GST_Max_Otime,Q_LGST,Q_LGST_Max,Q_LGST_Max_OTime,Q_LGST_Min,Q_LGST_Min_OTime,Q_TEM_ChANGE_24h,Q_RHU,Q_VAP,Q_RHU_Min,Q_RHU_Min_OTIME,Q_PRE,Q_Snow_Depth,Q_PRE_1h,Q_PRE_3h,Q_PRE_6h,Q_PRE_12h,Q_PRE_24h,Q_EVP_Big,Q_Snow_PRS,Q_VIS,Q_VIS_HOR_1MI,Q_VIS_HOR_10MI,Q_WEP_Now,Q20003_1,Q_WEP_Past_1,Q20004_1,Q_WEP_Past_2,Q20005_1,Q_CLO_Cov,Q_CLO_COV_LM,Q_CLO_Height_LoM,Q_CLO_Cov_Low,Q_VIS_Min,Q_VIS_Min_OTime,Q_SCO,Q20214,Q_Dew,Q_Frost,Q_ICE,Q_GSS,Q_SoRi,Q_Glaze,Q20303_1,Q20304_1,Q_EICE,Q_EICET_NS,Q_EICET_WE,Q_EICEW_NS,Q_EICEW_WE,Q_EICED_NS,Q_EICED_WE,Q_FRS_1st_Top,Q_FRS_2nd_Top,Q_FRS_1st_Bot,Q_FRS_2nd_Bot,Q_CLO_FOME_1,Q_CLO_Fome_2,Q_CLO_Fome_3,Q_CLO_Fome_4,Q_CLO_FOME_5,Q_CLO_FOME_6,Q_CLO_FOME_7,Q_CLO_Fome_8,Q_CLO_Fome_Low,Q_CLO_FOME_MID,Q_CLO_Fome_High,Station_Id_d,Station_Type,V02175,V02176,V02177,V02180,V02183,Year,Mon,Day,Hour,PRE_Arti_Enc_CYC,WEP_Past_CYC,V04080_05_1,PRS_Sensor_Alti,TEM_RHU_Sensor_Heigh,VIS_Sensor_Heigh,WIN_S_Sensor_Heigh,V08010,PRS,PRS_Sea,PRS_Change_3h,PRS_Change_24h,PRS_Max,PRS_Max_OTime,PRS_Min,PRS_Min_OTime,WIN_D,WIN_S,WIN_S_Max,WIN_S_Max_OTime,WIN_S_Inst_Max,WIN_S_INST_Max_OTime,WIN_D_INST,WIN_S_INST,WIN_D_INST_Max,WIN_D_Avg_2mi,WIN_S_Avg_2mi,WIN_D_Avg_10mi,WIN_S_Avg_10mi,WIN_D_S_Max,WIN_D_Inst_Max_6h,WIN_D_Inst_Max_12h,WIN_S_Inst_Max_6h,WIN_S_Inst_Max_12h,TEM,DPT,TEM_Max,TEM_Max_OTime,TEM_Min,TEM_Min_OTime,GST_Min_12h,TEM_Max_24h,TEM_Min_24h,GST_5cm,GST_10cm,GST_15cm,GST_20cm,GST_40Cm,GST_80cm,GST_160cm,GST_320cm,GST,GST_Min,GST_Min_OTime,GST_Max,GST_Max_Otime,LGST,LGST_Max,LGST_Max_OTime,LGST_Min,LGST_Min_OTime,TEM_ChANGE_24h,RHU,VAP,RHU_Min,RHU_Min_OTIME,PRE,Snow_Depth,PRE_1h,PRE_3h,PRE_6h,PRE_12h,PRE_24h,EVP_Big,V13196,Snow_PRS,VIS,VIS_HOR_1MI,VIS_HOR_10MI,WEP_Now,V20003_1,WEP_Past_1,V20004_1,WEP_Past_2,V20005_1,CLO_Cov,CLO_COV_LM,CLO_Height_LoM,CLO_Cov_Low,VIS_Min,VIS_Min_OTime,SCO,V20214,Dew,Frost,ICE,GSS,SoRi,Glaze,V20303_1,WEP_Record,V20304_1,EICE,EICET_NS,EICET_WE,EICEW_NS,EICEW_WE,EICED_NS,EICED_WE,FRS_1st_Top,FRS_2nd_Top,FRS_1st_Bot,FRS_2nd_Bot,CLO_FOME_1,CLO_Fome_2,CLO_Fome_3,CLO_Fome_4,CLO_FOME_5,CLO_FOME_6,CLO_FOME_7,CLO_Fome_8,CLO_Fome_Low,CLO_FOME_MID,CLO_Fome_High,REP_CORR_ID,RETAIN1,V_RETAIN10,RETAIN2,RETAIN3,V_RETAIN4,V_RETAIN5,V_RETAIN6,V_RETAIN7,V_RETAIN8,V_RETAIN9,V_RETAIN_OLD1,V_RETAIN_OLD10,V_RETAIN_OLD11,V_RETAIN_OLD12,V_RETAIN_OLD13,V_RETAIN_OLD14,V_RETAIN_OLD2,V_RETAIN_OLD3,V_RETAIN_OLD4,V_RETAIN_OLD5,V_RETAIN_OLD6,V_RETAIN_OLD7,V_RETAIN_OLD8,V_RETAIN_OLD9'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "de2f40a8-b726-4e21-bb1d-17bbc96a91a8",
   "metadata": {},
   "outputs": [],
   "source": [
    "stations_df=pd.read_csv('../datas/Stations.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "b65de07b-ed94-4093-a884-e7b05bb04bab",
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "elements=list(set(elements.split(','))-set(stations_df.columns))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "4cce003f-0720-4e47-8fe1-e99b05214579",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'E:\\\\study\\\\monicmadaas'"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "os.path.abspath(os.path.abspath('./')+'./../')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "003f6f35-8fcd-4f05-8fcd-6363ca5a7194",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'E:\\\\study\\\\monicmadaas'"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "os.path.abspath(os.path.abspath('.')+'/../')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "1b57535b-557e-4910-b507-2e144a8ddb3b",
   "metadata": {},
   "outputs": [],
   "source": [
    "module=importlib.import_module(f'routers.SURF_CHN_MUL_HOR')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "333253f0-7875-4264-a073-a1264ab7fd44",
   "metadata": {},
   "outputs": [],
   "source": [
    "interfaceId='getSurfEleInRegionByTime'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "b2a21f73-4fe0-4ccb-a643-27f1d29fc141",
   "metadata": {},
   "outputs": [],
   "source": [
    "stations_filtered = stations_df.copy()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "31acd97c-be8b-44bf-98a6-6a0a119e3841",
   "metadata": {},
   "outputs": [],
   "source": [
    "adminCodes='420000'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "01871dcc-d1c4-49ee-8fcb-27e0aafe80b6",
   "metadata": {},
   "outputs": [],
   "source": [
    "adminCodes=list(map(int,adminCodes.split(',')))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "4a58d71a-79d3-47aa-9adc-8b7927ae5c5d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[420000]"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "adminCodes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "id": "3cedb56f-7787-4191-b063-98f34b4e3fb3",
   "metadata": {},
   "outputs": [],
   "source": [
    "times=['20251010121212']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "id": "c36f6ad3-fe04-4d06-80b4-e7c7b2191ad4",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "筛选后的站点数量: 301\n"
     ]
    }
   ],
   "source": [
    "stations_filtered0 = stations_df.copy()\n",
    "stations_filtered0=stations_filtered0[(stations_filtered0['ProvinceCode'].isin(adminCodes))|(stations_filtered0['CityCode'].isin(adminCodes))|(stations_filtered0['CntyCode'].isin(adminCodes))]\n",
    "print(f\"筛选后的站点数量: {len(stations_filtered0)}\")\n",
    "elements=set(elements.split(','))-set(stations_filtered0.columns)\n",
    "dfs=[]\n",
    "for time in times:\n",
    "    dtime=dateutil.parser.parse(time)\n",
    "    stations_filtered=stations_filtered0.copy()\n",
    "    stations_filtered['Datetime'] = dtime.strftime('%Y-%m-%d %H:%M:%S')\n",
    "    data = {}\n",
    "    for element in elements:\n",
    "        data[element] = np.round(np.random.randn(len(stations_filtered)),1)\n",
    "    \n",
    "    data= pd.DataFrame(data,index=stations_filtered.index)   \n",
    "    data=pd.concat([stations_filtered, data], axis=1)     \n",
    "    dfs.append(data)\n",
    "ds=pd.concat(dfs)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "b47a4db7-c529-42f6-90e0-3846a53b228e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['Station_Id_C', 'Lon', 'Lat', 'Alti', 'Station_levl', 'Province',\n",
       "       'City', 'Cnty', 'Country', 'ProvinceCode',\n",
       "       ...\n",
       "       'V_RETAIN_OLD12', 'Q_CLO_FOME_6', 'D_SOURCE_ID', 'Station_Id_d',\n",
       "       'Q_WIN_D_Avg_10mi', 'Q_VIS_HOR_10MI', 'Q_GST_80cm', 'Q_RHU',\n",
       "       'GST_320cm', 'CLO_COV_LM'],\n",
       "      dtype='object', length=306)"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ds.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "id": "4d5337e7-74f0-4fd8-bb5b-53c89e5b514a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Station_Id_C</th>\n",
       "      <th>Lon</th>\n",
       "      <th>Lat</th>\n",
       "      <th>Alti</th>\n",
       "      <th>Station_levl</th>\n",
       "      <th>Province</th>\n",
       "      <th>City</th>\n",
       "      <th>Cnty</th>\n",
       "      <th>Country</th>\n",
       "      <th>ProvinceCode</th>\n",
       "      <th>...</th>\n",
       "      <th>V_RETAIN_OLD12</th>\n",
       "      <th>Q_CLO_FOME_6</th>\n",
       "      <th>D_SOURCE_ID</th>\n",
       "      <th>Station_Id_d</th>\n",
       "      <th>Q_WIN_D_Avg_10mi</th>\n",
       "      <th>Q_VIS_HOR_10MI</th>\n",
       "      <th>Q_GST_80cm</th>\n",
       "      <th>Q_RHU</th>\n",
       "      <th>GST_320cm</th>\n",
       "      <th>CLO_COV_LM</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>4861</th>\n",
       "      <td>57249</td>\n",
       "      <td>109.68</td>\n",
       "      <td>32.32</td>\n",
       "      <td>0.0</td>\n",
       "      <td>11</td>\n",
       "      <td>湖北省</td>\n",
       "      <td>十堰市</td>\n",
       "      <td>竹溪县</td>\n",
       "      <td>中国</td>\n",
       "      <td>420000</td>\n",
       "      <td>...</td>\n",
       "      <td>0.1</td>\n",
       "      <td>-0.9</td>\n",
       "      <td>-1.1</td>\n",
       "      <td>-0.4</td>\n",
       "      <td>-1.1</td>\n",
       "      <td>-1.3</td>\n",
       "      <td>1.2</td>\n",
       "      <td>-0.3</td>\n",
       "      <td>1.4</td>\n",
       "      <td>-0.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4862</th>\n",
       "      <td>57251</td>\n",
       "      <td>110.42</td>\n",
       "      <td>33.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>11</td>\n",
       "      <td>湖北省</td>\n",
       "      <td>十堰市</td>\n",
       "      <td>郧西县</td>\n",
       "      <td>中国</td>\n",
       "      <td>420000</td>\n",
       "      <td>...</td>\n",
       "      <td>-1.3</td>\n",
       "      <td>-1.6</td>\n",
       "      <td>-1.5</td>\n",
       "      <td>0.3</td>\n",
       "      <td>0.2</td>\n",
       "      <td>-1.7</td>\n",
       "      <td>0.7</td>\n",
       "      <td>-0.8</td>\n",
       "      <td>1.1</td>\n",
       "      <td>-0.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4863</th>\n",
       "      <td>57253</td>\n",
       "      <td>110.82</td>\n",
       "      <td>32.85</td>\n",
       "      <td>0.0</td>\n",
       "      <td>11</td>\n",
       "      <td>湖北省</td>\n",
       "      <td>十堰市</td>\n",
       "      <td>郧阳区</td>\n",
       "      <td>中国</td>\n",
       "      <td>420000</td>\n",
       "      <td>...</td>\n",
       "      <td>-1.4</td>\n",
       "      <td>-0.7</td>\n",
       "      <td>0.2</td>\n",
       "      <td>1.3</td>\n",
       "      <td>0.2</td>\n",
       "      <td>1.1</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.5</td>\n",
       "      <td>-1.5</td>\n",
       "      <td>0.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4864</th>\n",
       "      <td>57256</td>\n",
       "      <td>110.78</td>\n",
       "      <td>32.65</td>\n",
       "      <td>0.0</td>\n",
       "      <td>11</td>\n",
       "      <td>湖北省</td>\n",
       "      <td>十堰市</td>\n",
       "      <td>张湾区</td>\n",
       "      <td>中国</td>\n",
       "      <td>420000</td>\n",
       "      <td>...</td>\n",
       "      <td>1.4</td>\n",
       "      <td>-0.3</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.3</td>\n",
       "      <td>-0.3</td>\n",
       "      <td>-1.5</td>\n",
       "      <td>0.3</td>\n",
       "      <td>1.1</td>\n",
       "      <td>-0.1</td>\n",
       "      <td>2.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4865</th>\n",
       "      <td>57257</td>\n",
       "      <td>110.23</td>\n",
       "      <td>32.22</td>\n",
       "      <td>0.0</td>\n",
       "      <td>11</td>\n",
       "      <td>湖北省</td>\n",
       "      <td>十堰市</td>\n",
       "      <td>竹山县</td>\n",
       "      <td>中国</td>\n",
       "      <td>420000</td>\n",
       "      <td>...</td>\n",
       "      <td>0.9</td>\n",
       "      <td>0.9</td>\n",
       "      <td>-0.4</td>\n",
       "      <td>-1.5</td>\n",
       "      <td>0.4</td>\n",
       "      <td>-0.6</td>\n",
       "      <td>-0.1</td>\n",
       "      <td>0.7</td>\n",
       "      <td>0.4</td>\n",
       "      <td>0.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5157</th>\n",
       "      <td>819604</td>\n",
       "      <td>115.90</td>\n",
       "      <td>29.89</td>\n",
       "      <td>0.0</td>\n",
       "      <td>14</td>\n",
       "      <td>湖北省</td>\n",
       "      <td>黄冈市</td>\n",
       "      <td>黄梅县</td>\n",
       "      <td>中国</td>\n",
       "      <td>420000</td>\n",
       "      <td>...</td>\n",
       "      <td>-1.6</td>\n",
       "      <td>-0.1</td>\n",
       "      <td>0.5</td>\n",
       "      <td>-0.3</td>\n",
       "      <td>-0.2</td>\n",
       "      <td>0.5</td>\n",
       "      <td>-1.5</td>\n",
       "      <td>0.7</td>\n",
       "      <td>0.9</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5158</th>\n",
       "      <td>819616</td>\n",
       "      <td>115.78</td>\n",
       "      <td>30.15</td>\n",
       "      <td>0.0</td>\n",
       "      <td>14</td>\n",
       "      <td>湖北省</td>\n",
       "      <td>黄冈市</td>\n",
       "      <td>黄梅县</td>\n",
       "      <td>中国</td>\n",
       "      <td>420000</td>\n",
       "      <td>...</td>\n",
       "      <td>0.8</td>\n",
       "      <td>0.9</td>\n",
       "      <td>0.8</td>\n",
       "      <td>-0.6</td>\n",
       "      <td>-1.3</td>\n",
       "      <td>1.1</td>\n",
       "      <td>1.1</td>\n",
       "      <td>0.9</td>\n",
       "      <td>-0.5</td>\n",
       "      <td>0.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5159</th>\n",
       "      <td>819809</td>\n",
       "      <td>115.06</td>\n",
       "      <td>30.81</td>\n",
       "      <td>0.0</td>\n",
       "      <td>14</td>\n",
       "      <td>湖北省</td>\n",
       "      <td>黄冈市</td>\n",
       "      <td>团风县</td>\n",
       "      <td>中国</td>\n",
       "      <td>420000</td>\n",
       "      <td>...</td>\n",
       "      <td>0.5</td>\n",
       "      <td>0.4</td>\n",
       "      <td>-0.8</td>\n",
       "      <td>0.9</td>\n",
       "      <td>-0.7</td>\n",
       "      <td>0.2</td>\n",
       "      <td>-0.1</td>\n",
       "      <td>-0.4</td>\n",
       "      <td>-0.3</td>\n",
       "      <td>0.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5160</th>\n",
       "      <td>819900</td>\n",
       "      <td>115.03</td>\n",
       "      <td>30.61</td>\n",
       "      <td>0.0</td>\n",
       "      <td>14</td>\n",
       "      <td>湖北省</td>\n",
       "      <td>黄冈市</td>\n",
       "      <td>团风县</td>\n",
       "      <td>中国</td>\n",
       "      <td>420000</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.4</td>\n",
       "      <td>-0.3</td>\n",
       "      <td>0.3</td>\n",
       "      <td>3.6</td>\n",
       "      <td>0.2</td>\n",
       "      <td>1.1</td>\n",
       "      <td>-0.3</td>\n",
       "      <td>2.4</td>\n",
       "      <td>-0.9</td>\n",
       "      <td>0.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8201</th>\n",
       "      <td>57254</td>\n",
       "      <td>110.12</td>\n",
       "      <td>32.82</td>\n",
       "      <td>0.0</td>\n",
       "      <td>11</td>\n",
       "      <td>湖北省</td>\n",
       "      <td>十堰市</td>\n",
       "      <td>郧西县</td>\n",
       "      <td>中国</td>\n",
       "      <td>420000</td>\n",
       "      <td>...</td>\n",
       "      <td>-1.3</td>\n",
       "      <td>-0.6</td>\n",
       "      <td>-1.5</td>\n",
       "      <td>1.5</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.2</td>\n",
       "      <td>-0.1</td>\n",
       "      <td>0.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.6</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>301 rows × 305 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      Station_Id_C     Lon    Lat  Alti  Station_levl Province City Cnty  \\\n",
       "4861         57249  109.68  32.32   0.0            11      湖北省  十堰市  竹溪县   \n",
       "4862         57251  110.42  33.00   0.0            11      湖北省  十堰市  郧西县   \n",
       "4863         57253  110.82  32.85   0.0            11      湖北省  十堰市  郧阳区   \n",
       "4864         57256  110.78  32.65   0.0            11      湖北省  十堰市  张湾区   \n",
       "4865         57257  110.23  32.22   0.0            11      湖北省  十堰市  竹山县   \n",
       "...            ...     ...    ...   ...           ...      ...  ...  ...   \n",
       "5157        819604  115.90  29.89   0.0            14      湖北省  黄冈市  黄梅县   \n",
       "5158        819616  115.78  30.15   0.0            14      湖北省  黄冈市  黄梅县   \n",
       "5159        819809  115.06  30.81   0.0            14      湖北省  黄冈市  团风县   \n",
       "5160        819900  115.03  30.61   0.0            14      湖北省  黄冈市  团风县   \n",
       "8201         57254  110.12  32.82   0.0            11      湖北省  十堰市  郧西县   \n",
       "\n",
       "     Country  ProvinceCode  ...  V_RETAIN_OLD12  Q_CLO_FOME_6  D_SOURCE_ID  \\\n",
       "4861      中国        420000  ...             0.1          -0.9         -1.1   \n",
       "4862      中国        420000  ...            -1.3          -1.6         -1.5   \n",
       "4863      中国        420000  ...            -1.4          -0.7          0.2   \n",
       "4864      中国        420000  ...             1.4          -0.3          0.1   \n",
       "4865      中国        420000  ...             0.9           0.9         -0.4   \n",
       "...      ...           ...  ...             ...           ...          ...   \n",
       "5157      中国        420000  ...            -1.6          -0.1          0.5   \n",
       "5158      中国        420000  ...             0.8           0.9          0.8   \n",
       "5159      中国        420000  ...             0.5           0.4         -0.8   \n",
       "5160      中国        420000  ...            -0.4          -0.3          0.3   \n",
       "8201      中国        420000  ...            -1.3          -0.6         -1.5   \n",
       "\n",
       "      Station_Id_d  Q_WIN_D_Avg_10mi  Q_VIS_HOR_10MI  Q_GST_80cm  Q_RHU  \\\n",
       "4861          -0.4              -1.1            -1.3         1.2   -0.3   \n",
       "4862           0.3               0.2            -1.7         0.7   -0.8   \n",
       "4863           1.3               0.2             1.1         2.0    0.5   \n",
       "4864           0.3              -0.3            -1.5         0.3    1.1   \n",
       "4865          -1.5               0.4            -0.6        -0.1    0.7   \n",
       "...            ...               ...             ...         ...    ...   \n",
       "5157          -0.3              -0.2             0.5        -1.5    0.7   \n",
       "5158          -0.6              -1.3             1.1         1.1    0.9   \n",
       "5159           0.9              -0.7             0.2        -0.1   -0.4   \n",
       "5160           3.6               0.2             1.1        -0.3    2.4   \n",
       "8201           1.5               1.0             0.2        -0.1    0.2   \n",
       "\n",
       "      GST_320cm  CLO_COV_LM  \n",
       "4861        1.4        -0.3  \n",
       "4862        1.1        -0.1  \n",
       "4863       -1.5         0.6  \n",
       "4864       -0.1         2.4  \n",
       "4865        0.4         0.2  \n",
       "...         ...         ...  \n",
       "5157        0.9         1.0  \n",
       "5158       -0.5         0.4  \n",
       "5159       -0.3         0.2  \n",
       "5160       -0.9         0.7  \n",
       "8201        0.0         1.6  \n",
       "\n",
       "[301 rows x 305 columns]"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "id": "fe2f34ed-66ac-4698-85d4-1bba2e708626",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Station_Id_C\n",
      "Lon\n",
      "Lat\n",
      "Alti\n",
      "Station_levl\n",
      "Province\n",
      "City\n",
      "Cnty\n",
      "Country\n",
      "ProvinceCode\n",
      "CityCode\n",
      "CntyCode\n"
     ]
    }
   ],
   "source": [
    "for c in stations_df.columns:\n",
    "    print(c)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c9bddfb4-0292-42c4-9671-1737d4e99ea3",
   "metadata": {},
   "outputs": [],
   "source": [
    "len(stations_df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c89b4cd8-c02e-43ce-be62-293ded0a9970",
   "metadata": {},
   "outputs": [],
   "source": [
    "js=json.loads(data.to_json(orient='records'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3d5764fc-7b62-437e-9910-cd570169e09c",
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "js"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "0ecbb516-acd9-4d3a-a326-e28bb29bdee2",
   "metadata": {},
   "outputs": [],
   "source": [
    "fieldNames"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "1c1c5d9f-7105-46d9-b50d-45cdb4cad0a2",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "0583e2c8-711a-4618-ba01-28d9bd662465",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "096edfdb-ef79-493a-ac9e-de064279b591",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "fb21e37a-b0b7-4020-8e8f-2e08a2aa5fad",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "99d1e9a6-4595-470d-852d-7ccf8eeddb14",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d55516ca-5f4f-440a-87d1-bd7d367992e7",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "bb9118cb-83ca-4047-8fb2-99a4ef49c75d",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "43fc6000-49f6-4e09-ab87-9776175b3545",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b68ba544-219f-4152-91fe-792ad0615e88",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "aa2dd02b-b2f6-41fc-a5ad-4813bc5c927f",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3b2bdab7-5e78-4c03-8294-d460e95b0b1a",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "aacb9d3f-9cf9-4582-93b4-b84aa3fe0271",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "473f0c15-464c-4abf-9557-e47153ff1b61",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "047af985-0044-4094-a540-6821fd858e4f",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "43d8715f-e43b-4114-a73b-302e11614f1b",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "2f0a8af4-db05-4a18-81ea-727839217591",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python [conda env:webdev]",
   "language": "python",
   "name": "conda-env-webdev-py"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
